home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wayzata's Best of Shareware PC/Windows 1
/
Wayzata's Best of Shareware for PC-Windows - Release 1 - Wayzata Technology (1993).iso
/
mac
/
DOS
/
CAD_CAM
/
A7221V1B
/
ADI7221.DOC
next >
Wrap
Text File
|
1992-03-17
|
24KB
|
564 lines
ADI7221
Version 1.0b
University of Rochester
Psychology Department
March, 1992
Sections in this document:
DISCLAIMER
TRADEMARKS
INTRODUCTION
AUTHENTICITY
COPYING
COMPILING
SYSTEM REQUIREMENTS
USAGE
AUTOCAD SETUP
LINE TYPES
ERROR AND WARNING MESSAGES
BUGS
----------------------------------DISCLAIMER---------------------------------
This software is distributed free of charge. As such, it comes with
ABSOLUTELY NO WARRANTY. The user of the software assumes ALL RISKS
associated with its use.
Please read the COPYING section of this document to determine your rights
to copy and/or modify this software.
----------------------------------TRADEMARKS---------------------------------
IBM is a registered trademark of International Business Machines.
AutoCAD and ADI are registered trademarks of Autodesk, Inc.
Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Corp.
Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.
---------------------------------INTRODUCTION--------------------------------
The AutoCAD system provides very limited support for different types of
printers and plotters. Instead of providing support for a wide variety of
devices, AutoCAD (versions 2 and above) includes the ability to produce
device independant plot files. The files are written in the AutoCAD
Device Independant (ADI) format.
The ADI7221 program is an AutoCAD ADI file converter that takes an ASCII
format ADI file and converts it to HP's 7221 plotter language. The con-
version produces an output file that can then be sent to the plotter for
plotting. Due to the way buffer control and program mode are handled, the
file must be sent by the SEND7221 program, or some other program that
understands HP 7221 device control.
Since an ADI format file contains all of the information needed to plot
any AutoCAD drawing, the ADI7221 program is quite simple to use, and
actually has no options at all. All of the setup work that needs to be
done actually takes place in AutoCAD. For that reason, a large portion of
this document actually concerns itself with the procedures used to
configure AutoCAD to produce a file that can be converted correctly by the
ADI7221 program. Please the read the AutoCAD Setup section of this
docment for more information on this topic.
---------------------------------AUTHENTICITY--------------------------------
To ensure that your copy of ADI7221 is virus free, it is recommened that
you obtain a copy of the VALIDATE program. This program is free, and is
part of the McAffee Associates virus protection package (the rest of the
package is shareware). McAffee associates can be contacted at
(408) 988-3832.
The Size reported for ADI7221.EXE and the Hex numbers associated with
"Check Method 1" and "Check Method 2" should match the output from the
following run of VALIDATE version 0.3:
File Name: ADI7221.EXE
Size: 15,613
Date: 3-16-1992
File Authentication:
Check Method 1 - 58FE
Check Method 2 - 0DA1
-----------------------------------COPYING-----------------------------------
You may copy and redistribute this software and its source code in its
unaltered state, provided that each copy is labeled with the original
copyright and disclaimer of warranty notices. Recipients of distributed
copies of this software must also be given the rights outlined here. No
fee may be charged for copies beyond nominal copying and media costs.
You may modify your copy of the source code, and may distribute the
modified versions under the following conditions:
All modified files must be clearly labeled as modified versions, such
labels must include the authors name, the date, and the nature of all
changes.
Any program that contains the source code from this software, in whole
or in part, must be licensed free of charge, under the same conditions
as those outlined in this document. The one exception being that you
can provide a warranty for your program if you choose.
A reasonable attempt must be made to notify the orignal author of this
software prior to distribution of modified versions. Such notification
should include the nature of all changes made to the software.
The original author can be contacted at any of the following address:
Dave Lutz
Psychology/Meliora Hall
Univeristy of Rochester
Rochester, NY 14627
Electronic mail may be sent to one of the following addresses:
Internet: lutz@psych.rochester.edu
or
lutz@prodigal.psych.rochester.edu
BITNET: lutz@uordbv
Bug reports can also be sent to any of the addresses listed above.
----------------------------------COMPILING----------------------------------
The source code for the ADI 7221 program has been included so that you may
compile it yourself if you wish. The code is written in C, and was tested
using MicroSoft C 5.1. A Makefile for that compiler has been included in
the distribution. If you do not have MSC 5.1, you may have to create your
own Makefile.
The source code for ADI7221.EXE is meant to be portable among different PC
compilers, and probably among different CPU types. However, the source for
SEND7221.EXE contains code that may be compiler dependant, and is
definitely CPU dependant. (sorry folks, serial I/O on a PC is a royal pain)
For more information on the non-portable code in SEND7221, read
SEND7221.DOC.
The following discussion assumes that the files in the distribution were
installed as follows:
/ADI - .DOC files and precompiled .EXE files
/ADI/ADI7221 - source for ADI7221.EXE
/ADI/SEND7221 - source for SEND7221.EXE
It is critical that you DO NOT COMBINE the source code for ADI7221 and
SEND7221 in the same directory. The two programs have modules/files by
the same names that have different contents.
Before you begin compilation, CD to /ADI/ADI7221. Next, look at the
definitions in MAKEFILE.MSC and modify them for your local site.
Assuming you have MSC 5.1, you should type "make makefile.msc". The code
should compile with no errors, except that you will get the normal "Warning
target does not exist" message for each module as it is compiled.
As it is currently defined, the makefile will first produce an executable
called ADI7221.EXE in the ADI7221 directory. This executable is then
packed via MicroSoft's EXEPACK command, producing the final ADI7221.EXE
in /ADI.
Once the final exeutable is in place, you can delete all of the .OBJ files
and the intermediate ADI7221.EXE file from /ADI/ADI7221.
-----------------------------SYSTEM REQUIREMENTS-----------------------------
ADI7221 should run correctly on any IBM compatible PC that has at least
80k of free memory.
There is no limit to the size of the input or output files (except for
available disk space), and the memory requirements of the program do not
change with the size of the input and output files.
------------------------------------USAGE------------------------------------
The command line for the ADI7221 program is quite simple, and consists
of the following:
ADI7221 infile.plt outfile.hpp
There are no command line options. The program expects infile.plt to be
an ascii format, AutoCAD ADI file produced via the AutoCAD "plot"
function. ADI7221 produces outfile.hpp, overwriting that file if it
already exists. The output file contains the HP 7221 plotter codes that
are to be sent to the plotter.
In order for ADI7221 to work correctly, AutoCAD must have been set up with
the correct information for producing the ADI plot file. For information
on configuring AutoCAD, consult the AutoCAD Setup section of this
document.
The file produced by ADI7221 must be sent to the plotter via the SEND7221
program (or one similar to it). The MS-DOS print command will not work
correctly, due to the way buffer control is handled on the HP 7221
plotter. The SEND7221 program is described in the file SEND7221.DOC.
Since the ADI7221 and SEND7221 programs will usually be run in sequence,
a batch file, PLOT7221, has been included in the distribution. The
command line for this batch file consists of the following:
PLOT7221 plotname
The plotname parameter should not include a file extension. PLOT7221
looks for a file named plotname.PLT, and attempts to convert it to a
file named plotname.HPP via the ADI7221 program. If the ADI7221 program
completes successfully, SEND7221 is then called to send plotname.HPP to
the plotter.
Command line options for the SEND7221 program can be included on the
PLOT7221 command line. These options must follow the plotname
parameter. Again, SEND7221 and its options are described in SEND7221.DOC.
--------------------------------AUTOCAD SETUP--------------------------------
As mentioned earlier, there are no command line options for the ADI7221
program. The reason for this is that all of your options are set by the
way you configure AutoCAD. This section describes the AutoCAD configur-
ation procedure, and defines settings that are critical for the successful
use of ADI7221.
The description that follows is based on AutoCAD release 10. If you are
using a different version of AutoCAD, the specific details of the pro-
cedure may differ slightly. However, the important thing to get from this
section is the values used to reply to various configuration questions. I
suspect that the configuration questions will be very similar between
versions.
There are actually two steps in the confiuration process. First, you
define most of the permanent physical characteristics of the plotter,
then you define pen numbers, line types, and speed settings for each
of the colors you can use within an AutoCAD drawing. The first step is
completed through the configuration menus in AutoCAD, the second step
is completed when you plot your first drawing.
To begin the configuration process, start AutoCAD in the usual manner.
You should be able to select "Configure AutoCAD" from the main AutoCAD
menu. Next, select "Configure Plotter" from the resulting menu.
The currently active plotter type is then displayed on the screen, and
you are asked if you want to change it. If the current plotter is not
"ADI plotter", answer Y and go on to select "ADI PLOTTER" from the
resulting menu.
The remaining questions are simple one liners (for the most part), so
I'll just list the questions and answers.
Output Format: ASCII File
Does the plotter have multiple pens? Y
How many? 4 or 10 depending on the model
Does the plotter support multiple dashed-line styles? Y
How many? 9
Is the plotter variable speed? Y
Code for highest speed: 36
Specify units in millimeters? N
Maximum horizontal (X) plot size in inches: 15.2
Plotter steps per inch in the horizontal (X) direction: 200
Maximum vertical (Y) plot size in inches: 10.0
Plotter steps per inch in the horizontal (Y) direction: 200
Would you like to calibrate your plotter? N
Size units (Inches or Millimeters)? I
Plot origin in Inches: 0.0,0.0
Enter size or Width,Height (inches): MAX
Rotate 2D plots 90 degrees clockwise? N
Pen Width: 0.010
Adjust area fill boundries for pen width? N
Remove Hidden lines? N
Specify Scale by entering:
plotted inches = Drawing Units or Fit? F
At this point, you should return to the configuration menu. Request an
exit to the Main Menu. When asked if you want to keep configuration
changes, answer yes.
To complete the configuration process, you must begin plotting a drawing.
After supplying the name of the drawing you want to plot, you will be
asked to specify the part of the drawing that you want to plot. After
that, you will be presented with a list of the settings defined in the
configuration procedure, and will be asked if you want to change anything.
You should respond yes.
After responding yes to the above question, a list of the current pen
settings for each color will be displayed. Again, you will be asked if
you want to change any of the above settings. You should probably
respond yes, because the default settings don't take advantage of the
multiple pen/line-type/speed settings that are available.
If you respond yes, you will receive a set of prompts for each color that
has been defined to AutoCAD. You will first be asked for the pen number
for that color, then the linetype, then the speed.
For a list of available line types, see the Line Types section of this
document. Typically, you will want to use line type 0 (solid line) for
all of the colors.
The speed settings can be anything from 1 to 36. I set these all to the
maximum, but it might be better for the plotter to set them somewhat
lower.
For most users, there will be several entries that have a color number but
no color name. Don't bother assigning values to these entries because
they will never be used.
Once you have set the definitions for all of the colors, you can use the
X command to finish this section. If you want to double check your work,
use S to show the current settings.
You can hit return in response to all of the remaining questions, since
the only thing we really needed to change was the color/pen settings. The
settings that you defined will remain in effect for future plots until
you change them.
---------------------------------LINE TYPES----------------------------------
As mentioned in the AutoCAD Setup section, it is possible to assign a
particular line type to any of the color definitions. The line type
assigned will be used for all lines drawn in that color. This is of
limited value, but might be useful for identifying a color when a pen
for that color is not actually available. For example, you might assign
the color yellow to use the green pen, but to draw all lines in dashed
mode. I don't actually recommend this.
For information on assigning line types, see the AutoCAD Setup section
of this document.
Currently supported line types are:
(0) ----------------------------------- (solid)
(1) -- -- -- -- -- -- -- -- -- -- -- -- (dashed)
(2) - - - - - - - - - - - - - - - - - - (hidden)
(3) ---- - ---- - ---- - ---- - ---- - (center)
(4) ----- - - ----- - - ----- - - ----- (phantom)
(5) ................................... (dot)
(6) -- . -- . -- . -- . -- . -- . -- . (dashdot)
(7) -- -- . -- -- . -- -- . -- -- . -- (border)
(8) -- .. -- .. -- .. -- .. -- .. -- .. (divide)
Please note that, although the above line types are the same as those
defined in Release 10 of AutoCAD, they are not used to produce lines
drawn in a particular type in a drawing. AutoCAD produces its line
types by raising and lowering the pen appropriately.
If the program wass compiled with VARIABLE_DASHES defined, patterns in
the lines will be varied so that an integral number of patterns will be
included in each line segment. If VARIABLE_DASHES was not defined, fixed
length patterns will be used without regard for the completeness of each
pattern. (ie short line segments may not include a complete pattern)
In the precompiled distribution, VARIABLE_DASHES was not defined.
--------------------------ERROR AND WARNING MESSAGES-------------------------
Warning: input file not a version 1 ADI file.
This warning is produced when a file appears to be an ADI file, but is not
labeled as a version 1 file. ADI7221 will attempt to continue processing,
but may terminate later if other errors are encountered.
AutoCAD versions 2 through 10 all produce version 1 ADI files. If you are
using a version of AutoCAD within that range, this may indicate a bug in
the ADI7221 program. If you are using a version of AutoCAD higher than
release 10, check the manuals to see if you can specify which version of
ADI it should use when creating ADI files.
Warning: PEN_CHANGE encountered but not supported.
This warning message will only appear if ADI7221 has been compiled with
WARN_PENCHANGE defined. The precompiled distribution was not compiled with
this option defined.
ADI7221 does not support manual pen changes, because it is not a direct
feed to the plotter. A manual pen change requires that output stop while
an operator manually changes pens.
Don't confuse the manual PEN_CHANGE command with an automatic pen select.
ADI7221 will handle automatic pen selections correctly, formulating a
request for the plotter to automatically select a new pen from the
specified bay.
ADI7221 will continue processing after this warning, but the currently
selected pen will remain in effect.
Fatal error: can't allocate input buffer
There was not enough available memory to allocate the input buffer. You
either have an extrememly low amount of memory, or you have too many things
open in a multitasking or task switching environment.
Try closing some applications.
Fatal error: can't allocate output buffer
This is virtually the same as the input buffer allocation message.
Fatal error: can't open input file for reading
The input file either could not be found, or an I/O error occured when an
attempt was made to open the file.
Check the file name for correct spelling. If the name is correct, try
running the MS-DOS CHKDSK command to see if there is a problem with the
disk.
Fatal error: can't open output file for writing
One of three things can cause this error: the output file couldn't be
created due to lack of disk space, the output file exists and has its
read-only bit set, or an I/O error occured when an attempt was made to
open/create the file.
If the output file already exists, run the MS-DOS ATTRIB command to see if
the read-only bit is set. If the file doesn't exist, check the amount of
free space on the disk, or try running the MS-DOS CHKDSK command to see if
there is a problem with the disk.
Fatal error: can't close input file
This generally indicates a problem with the disk.
Try running the MS-DOS CHKDSK command to identify the problem.
Fatal error: can't close output file
This generally indicates a problem with the disk.
Try running the MS-DOS CHKDSK command to identify the problem.
Fatal error: I/O error on input
This generally indicates a problem with the disk.
Try running the MS-DOS CHKDSK command to identify the problem.
Fatal error: I/O error on output
This can be caused by either running out of space on the output disk, or
encountering a real media error.
Check the available free space on the output disk. 7221 format files
typically use about 1/2 the space of the ADI input file. If there seems
to be enough space for the output file, try running the MS-DOS CHKDSK
command to see if there is a problem with the disk.
Fatal error: input file not a valid ADI file
Upon examining the input file, ADI7221 does not recognize it as an ADI
file.
Recreate the input file via the plot function in AutoCAD. Make sure that
AutoCAD has been configured to produce an ascii format ADI file.
Fatal error: Multiple BEGIN_PLOT commands found
The input file was probably altered after it was created by AutoCAD. The
most likely cause would be appending one ADI file to another, which is a
definite no no.
Recreate the input file via the plot function in AutoCAD.
Fatal error: invalid MOVE command
The ending location for the move was so far out of bounds that it exceeded
the 7221 parameter limits.
Check the configuration in AutoCAD. Make sure that the size of the
plotting area is the same as that specified in the AutoCAD Setup section of
this manual.
Fatal error: invalid DRAW command
The ending location for the draw was so far out of bounds that it exceeded
the 7221 parameter limits.
Check the configuration in AutoCAD. Make sure that the size of the
plotting area is the same as that specified in the AutoCAD Setup section of
this manual.
Fatal error: invalid NEW_PEN command
The requested pen number was so far out of bounds that it exceeded the 7221
parameter limits.
Check the configuration in AutoCAD. Make sure that the number of pens
defined is equal to the number of pens on the plotter (typically 4 or 10).
Fatal error: invalid SET_SPEED command
The requested speed was out of the range defined in ADI7221.
Check the configuration in AutoCAD. Make sure that the highest speed
setting is within the limits specified in the AutoCAD Setup section of
this manual.
Fatal error: invalid LINE_TYPE command
The requested line type was out of the range defined in ADI7221.
Check the configuration in AutoCAD. Make sure that the number of line
types is within the limits specified in the AutoCAD Setup section of
this manual.
Fatal error: input file contains ABORT_PLOT command
The plot function in AutoCAD was interrupted during the creation of the
input file.
Recreate the input file via the AutoCAD plot function.
Fatal error: unknown command encountered
ADI7221 encountered a command that it cannot decode. The input file either
is not an ADI file at all, or is not a version 1 ADI file.
Try recreating the input file via the AutoCAD plot function. AutoCAD
versions 2 through 10 all produce version 1 ADI files. If you are using
a version of AutoCAD within that range, this may indicate a bug in the
ADI7221 program. If you are using a version of AutoCAD higher than release
10, check the manuals to see if you can specify which version of ADI it
should use when creating ADI files.
Fatal error: no END_PLOT encountered
ADI7221 has come to the end of the ADI file, but has not encountered an
END_PLOT command. This may indicate that AutoCAD was interrupted while
creating the ADI file.
Recreate the input file via the AutoCAD plot function.
------------------------------------BUGS-------------------------------------
Disk I/O errors are not all identified by type. An error message caused
by running out of space is the same as one caused by a true media error.
AutoCAD must be configured for the correct number of pens. ADI7221 does
not check to ensure that a pen select request is within the range of
available pens. This is due to the differing number of pens available
on 7221 series plotters.
Due to the device independant nature of AutoCAD ADI files, none of the
advanced features of the 7221 plotter are used. This tends to result in
large plot files, both for ADI format and for 7221 format. This is
espcially true for drawings containing text, since the text is actually
drawn like a graphic figure.
Error and Warning messages should probably have been given numbers so
they would be easier to find in this manual. There are only about 20
possible errors, so it shouldn't be too big of a deal.